package com.twu.biblioteca.menuoption.movies;

import com.twu.biblioteca.content.MovieContent;
import com.twu.biblioteca.menuoption.CheckoutOptionAbstract;

import java.io.BufferedReader;

/**
 * Created by mduemcke on 9/25/14.
 */
public class CheckoutMovie extends CheckoutOptionAbstract {

    private MovieContent content;

    public CheckoutMovie(MovieContent content, BufferedReader reader) {
        super(reader, "Checkout Movie", 'D');
        this.content = content;
    }

    @Override
    public void processOption() {
        String input = askForDetails("Type in the movie name:");
        if(input != "") {
            content.checkoutItem(input);
        }
    }
}
